#include <bits/stdc++.h>
using namespace std;

class Solution
{
public:
    int main()
    {
        int n;
        cin >> n;
        int minVal = INT_MAX;
        for (int i = 0; i < n; ++i)
        {
            int val;
            cin >> val;
            minVal = min(val, minVal);
        }
        cout << minVal;
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif